/*  1:   */ package org.intellij.lang.regexp.psi.impl;
/*  2:   */ 
/*  3:   */

import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiReference;
import com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry;
import com.intellij.psi.tree.IElementType;
import com.intellij.psi.tree.TokenSet;
import org.intellij.lang.regexp.RegExpElementTypes;
import org.intellij.lang.regexp.psi.RegExpBranch;
import org.intellij.lang.regexp.psi.RegExpElementVisitor;
import org.intellij.lang.regexp.psi.RegExpPattern;
import org.jetbrains.annotations.NotNull;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */
/* 10:   */
/* 11:   */
/* 12:   */
/* 13:   */ 
/* 14:   */ public class RegExpPatternImpl
/* 15:   */   extends RegExpElementImpl
/* 16:   */   implements RegExpPattern
/* 17:   */ {
/* 18:29 */   private static final TokenSet e = TokenSet.create(new IElementType[] { RegExpElementTypes.BRANCH });
/* 19:   */   
/* 20:   */   public RegExpPatternImpl(ASTNode paramASTNode)
/* 21:   */   {
/* 22:32 */     super(paramASTNode);
/* 23:   */   }
/* 24:   */   
/* 25:   */   public void accept(RegExpElementVisitor paramRegExpElementVisitor)
/* 26:   */   {
/* 27:36 */     paramRegExpElementVisitor.visitRegExpPattern(this);
/* 28:   */   }
/* 29:   */   
/* 30:   */   @NotNull
/* 31:   */   public RegExpBranch[] getBranches()
/* 32:   */   {
/* 33:41 */     ASTNode[] arrayOfASTNode = getNode().getChildren(e);
/* 34:42 */     RegExpBranch[] arrayOfRegExpBranch = new RegExpBranch[arrayOfASTNode.length];
/* 35:43 */     for (int i = 0; i < arrayOfRegExpBranch.length; i++) {
/* 36:44 */       arrayOfRegExpBranch[i] = ((RegExpBranch)arrayOfASTNode[i].getPsi());
/* 37:   */     }
/* 38:46 */     RegExpBranch[] tmp48_47 = arrayOfRegExpBranch;
/* 39:46 */     if (tmp48_47 == null) {
/* 40:46 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/psi/impl/RegExpPatternImpl", "getBranches" }));
/* 41:   */     }
/* 42:46 */     return tmp48_47;
/* 43:   */   }
/* 44:   */   
/* 45:   */   @NotNull
/* 46:   */   public PsiReference[] getReferences()
/* 47:   */   {
/* 48:52 */     PsiReference[] tmp6_3 = ReferenceProvidersRegistry.getReferencesFromProviders(this, RegExpPattern.class);
/* 49:52 */     if (tmp6_3 == null) {
/* 50:52 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/psi/impl/RegExpPatternImpl", "getReferences" }));
/* 51:   */     }
/* 52:52 */     return tmp6_3;
/* 53:   */   }
/* 54:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.intellij.lang.regexp.psi.impl.RegExpPatternImpl

 * JD-Core Version:    0.7.0.1

 */